
if (not commonlib.USE_LUV) then return {} end 

commonlib.__webserver_directory__ = commonlib.FormatPath(commonlib.__script_directory__ .. "/webserver");
commonlib.__webserver_filename__ = commonlib.FormatPath(commonlib.__webserver_directory__ .. "/init.lua");
local WebServer = commonlib.import("./WebServer.lua", commonlib.__webserver_filename__);

commonlib.WebServer = WebServer;

function commonlib.StartWebServer(ip, port)
    local web_server = WebServer:new():Init();
    web_server:Start(ip or "0.0.0.0", port or 80);
    return web_server;
end

function commonlib.StopWebServer(web_server)
    web_server:Stop();
end

return {};